<%-- 
    Document   : departmentsList
    Created on : Oct 17, 2012, 9:15:38 AM
    Author     : DinhThang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>JSP Page</title>
            <link rel="stylesheet" type="text/css" href="../styles/style.css" />
        </head>
        <body            
            <jsp:include page="../includes/incHeader.jsp" flush="false" />
            <h3>Add new Complaints</h3>
            <h:form>
                <h:outputText value="#{complaintsBean.complaints.userID}" />
                <h:inputHidden value="#{complaintsBean.complaints.complaintID}"/>
                <h:inputHidden value="#{complaintsBean.complaints.userID}"/>
                <h:inputHidden value="#{complaintsBean.complaints.userRef}"/>
                <h:panelGrid columns="2" style="margin:0 auto">
                    <h:outputText value="Thread:"/>
                    <h:selectOneMenu value="#{complaintsBean.complaints.threadID}" id="threadID">
                        <f:selectItems value="#{complaintsBean.threadsList}"  />
                    </h:selectOneMenu>
                    
                    <h:outputText value="Department:"/>
                    <h:selectOneMenu value="#{complaintsBean.complaints.departmentID}" id="departmentID">
                        <f:selectItems value="#{complaintsBean.departmentsList}"  />
                    </h:selectOneMenu>
                    
                    <h:outputText value="Title"/>
                    <h:inputText value="#{complaintsBean.complaints.title}"/>
                    
                    <h:outputText value="Complaint Content"/>
                    <h:inputText value="#{complaintsBean.complaints.complaintContent}"/>
                    
                    <h:outputText value="Priority"/>
                    <h:selectOneRadio value="#{complaintsBean.complaints.priority}">
                        <f:selectItem itemLabel="1" itemValue="1" />
                        <f:selectItem itemLabel="2" itemValue="2" />
                        <f:selectItem itemLabel="3" itemValue="3" />
                    </h:selectOneRadio>

                    <h:commandButton action="complaintAddBack" value="Back"/>
                    <h:commandButton action="#{complaintsBean.addNew}" value="Save"/>
                </h:panelGrid>
            </h:form>
            <jsp:include page="../includes/incFooter.jsp" flush="false" />
        </body>
    </html>
</f:view>